package com.zhangchao.day_book.model;

import java.util.ArrayList;
import java.util.List;

public class HistoryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public HistoryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andHistoryNoIsNull() {
            addCriterion("history_no is null");
            return (Criteria) this;
        }

        public Criteria andHistoryNoIsNotNull() {
            addCriterion("history_no is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryNoEqualTo(String value) {
            addCriterion("history_no =", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoNotEqualTo(String value) {
            addCriterion("history_no <>", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoGreaterThan(String value) {
            addCriterion("history_no >", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoGreaterThanOrEqualTo(String value) {
            addCriterion("history_no >=", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoLessThan(String value) {
            addCriterion("history_no <", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoLessThanOrEqualTo(String value) {
            addCriterion("history_no <=", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoLike(String value) {
            addCriterion("history_no like", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoNotLike(String value) {
            addCriterion("history_no not like", value, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoIn(List<String> values) {
            addCriterion("history_no in", values, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoNotIn(List<String> values) {
            addCriterion("history_no not in", values, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoBetween(String value1, String value2) {
            addCriterion("history_no between", value1, value2, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryNoNotBetween(String value1, String value2) {
            addCriterion("history_no not between", value1, value2, "historyNo");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoIsNull() {
            addCriterion("history_who is null");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoIsNotNull() {
            addCriterion("history_who is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoEqualTo(String value) {
            addCriterion("history_who =", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoNotEqualTo(String value) {
            addCriterion("history_who <>", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoGreaterThan(String value) {
            addCriterion("history_who >", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoGreaterThanOrEqualTo(String value) {
            addCriterion("history_who >=", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoLessThan(String value) {
            addCriterion("history_who <", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoLessThanOrEqualTo(String value) {
            addCriterion("history_who <=", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoLike(String value) {
            addCriterion("history_who like", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoNotLike(String value) {
            addCriterion("history_who not like", value, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoIn(List<String> values) {
            addCriterion("history_who in", values, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoNotIn(List<String> values) {
            addCriterion("history_who not in", values, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoBetween(String value1, String value2) {
            addCriterion("history_who between", value1, value2, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhoNotBetween(String value1, String value2) {
            addCriterion("history_who not between", value1, value2, "historyWho");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenIsNull() {
            addCriterion("history_when is null");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenIsNotNull() {
            addCriterion("history_when is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenEqualTo(String value) {
            addCriterion("history_when =", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenNotEqualTo(String value) {
            addCriterion("history_when <>", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenGreaterThan(String value) {
            addCriterion("history_when >", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenGreaterThanOrEqualTo(String value) {
            addCriterion("history_when >=", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenLessThan(String value) {
            addCriterion("history_when <", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenLessThanOrEqualTo(String value) {
            addCriterion("history_when <=", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenLike(String value) {
            addCriterion("history_when like", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenNotLike(String value) {
            addCriterion("history_when not like", value, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenIn(List<String> values) {
            addCriterion("history_when in", values, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenNotIn(List<String> values) {
            addCriterion("history_when not in", values, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenBetween(String value1, String value2) {
            addCriterion("history_when between", value1, value2, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhenNotBetween(String value1, String value2) {
            addCriterion("history_when not between", value1, value2, "historyWhen");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereIsNull() {
            addCriterion("history_where is null");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereIsNotNull() {
            addCriterion("history_where is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereEqualTo(String value) {
            addCriterion("history_where =", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereNotEqualTo(String value) {
            addCriterion("history_where <>", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereGreaterThan(String value) {
            addCriterion("history_where >", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereGreaterThanOrEqualTo(String value) {
            addCriterion("history_where >=", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereLessThan(String value) {
            addCriterion("history_where <", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereLessThanOrEqualTo(String value) {
            addCriterion("history_where <=", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereLike(String value) {
            addCriterion("history_where like", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereNotLike(String value) {
            addCriterion("history_where not like", value, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereIn(List<String> values) {
            addCriterion("history_where in", values, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereNotIn(List<String> values) {
            addCriterion("history_where not in", values, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereBetween(String value1, String value2) {
            addCriterion("history_where between", value1, value2, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryWhereNotBetween(String value1, String value2) {
            addCriterion("history_where not between", value1, value2, "historyWhere");
            return (Criteria) this;
        }

        public Criteria andHistoryHowIsNull() {
            addCriterion("history_how is null");
            return (Criteria) this;
        }

        public Criteria andHistoryHowIsNotNull() {
            addCriterion("history_how is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryHowEqualTo(String value) {
            addCriterion("history_how =", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowNotEqualTo(String value) {
            addCriterion("history_how <>", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowGreaterThan(String value) {
            addCriterion("history_how >", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowGreaterThanOrEqualTo(String value) {
            addCriterion("history_how >=", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowLessThan(String value) {
            addCriterion("history_how <", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowLessThanOrEqualTo(String value) {
            addCriterion("history_how <=", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowLike(String value) {
            addCriterion("history_how like", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowNotLike(String value) {
            addCriterion("history_how not like", value, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowIn(List<String> values) {
            addCriterion("history_how in", values, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowNotIn(List<String> values) {
            addCriterion("history_how not in", values, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowBetween(String value1, String value2) {
            addCriterion("history_how between", value1, value2, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryHowNotBetween(String value1, String value2) {
            addCriterion("history_how not between", value1, value2, "historyHow");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoIsNull() {
            addCriterion("history_userno is null");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoIsNotNull() {
            addCriterion("history_userno is not null");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoEqualTo(String value) {
            addCriterion("history_userno =", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoNotEqualTo(String value) {
            addCriterion("history_userno <>", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoGreaterThan(String value) {
            addCriterion("history_userno >", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoGreaterThanOrEqualTo(String value) {
            addCriterion("history_userno >=", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoLessThan(String value) {
            addCriterion("history_userno <", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoLessThanOrEqualTo(String value) {
            addCriterion("history_userno <=", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoLike(String value) {
            addCriterion("history_userno like", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoNotLike(String value) {
            addCriterion("history_userno not like", value, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoIn(List<String> values) {
            addCriterion("history_userno in", values, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoNotIn(List<String> values) {
            addCriterion("history_userno not in", values, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoBetween(String value1, String value2) {
            addCriterion("history_userno between", value1, value2, "historyUserno");
            return (Criteria) this;
        }

        public Criteria andHistoryUsernoNotBetween(String value1, String value2) {
            addCriterion("history_userno not between", value1, value2, "historyUserno");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}